<?php

namespace common\models\mall\special;

use Yii;
use common\models\BaseModel;

/**
 * 专题楼层
 */
class MallSpecialFloorModel extends BaseModel {

    /** @var int 绑定状态: 启用 */
    const STATE_ENABLE = 1;

    /** @var int 绑定状态: 禁用 */
    const STATE_DISABLE = 2;

    public static $state = [
        self::STATE_ENABLE => '启用',
        self::STATE_DISABLE => '禁用',
    ];

    /**
     * {@inheritdoc}
     */
    public static function tableName() {
        return '{{%mall_special_floor}}';
    }

    /**
     * 商品信息
     * **/
    public function getSpecialFloorGoods() {
        return $this->hasMany(MallSpecialFloorGoodsModel::className(), ['special_floor' => 'id']);
    }

}
